<template>
  <div class="bind">
    <basic-container>
      <avue-tabs :option="option" @change="handleChange"></avue-tabs>
      <User v-if="type.prop === 'user'"></User>
      <!-- <Grade v-else-if="type.prop === 'grade'"></Grade> -->
    </basic-container>
  </div>
</template>

<script>
import User from "./bind/user.vue";
// import Grade from "./bind/grade.vue";

export default {
  name: "Bind",
  components: {
    User
    // Grade
  },
  data() {
    return {
      type: {},
      option: {
        column: [
          {
            icon: "el-icon-warning",
            label: "适用人群绑定",
            prop: "user"
          }
          // {
          //   icon: "el-icon-question",
          //   label: "年级绑定",
          //   prop: "grade"
          // }
          // {
          //   icon: "el-icon-question",
          //   label: "学校绑定",
          //   prop: "school"
          // }
        ]
      }
    };
  },
  created() {
    this.type = this.option.column[0];
  },
  methods: {
    handleChange(column) {
      this.type = column;
      // this.$message.success(JSON.stringify(column));
    }
  }
};
</script>

<style lang="scss" scoped>
.bind {
}
</style>
